<?php

namespace App\Providers;

use App\FocusImg;
use App\ArticleType;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        $articleTypes = ArticleType::get();
        $focusImgs = FocusImg::orderBy('created_at', 'desc')
            ->get();
        view()->share([
            'articleTypes' => $articleTypes,
            'focusImgs' => $focusImgs
        ]);
    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }
}
